package com.meiyou.service;

import java.io.File;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import com.meiyou.pojo.MeiyouUser;
import com.meiyou.utils.Msg;

public interface UserService {
	
   public Boolean selCountByPhone(String phone);//手机号查找用户	
	
   public Msg insUserRegist(String phone,String password,String uccount);//用户注册
   
   public String selUserCount(String phone,double jindu,double weidu);//查询用户是否存在
   
   public int insUserSelective(MeiyouUser user); //选择性插入用户
   
   public boolean updPwd(String newpwd,String uphone); // 更新密码

   List<MeiyouUser> selPwdByCount(String ucount); //通过用户账户查询用户
   
   public List<MeiyouUser> selUserByPhonePwd(String phone,String pwd, Double jindu, Double weidu);
   
   public Msg selLoginByPwd(String phone,String pwd,Double jindu,Double weidu,HttpServletRequest req);//用户密码登录
   
   public int insUserByAlipayId(String uccount,String alipayId,String sex,String name,String img,HttpServletRequest req);//支付宝登录注册
  
   int updUserMeijin(double uMeijin,String uCount);//修改美金
   
   String selUserByUcount(String uCount);//查询用户美金
	
   String selUserPayByUcount(String uCount);//查询用户支付密码
   
   Msg faceDuibi(MultipartFile file,String imgurl);//人脸识别
   
   String selUserimg(String uccount);//查询用户头像
   
   Boolean updUserinfo(MeiyouUser user);//更新资料
   Boolean updUserinfoimg(MeiyouUser user);//更新头像
   Boolean updAddUserMeijin(double meijin,String uccount);//添加用户美金
   
   Msg updPwdByUccount(String newPwd,String uccount);//修改新密码
   
   Msg updPayPwdByUccount(String newPayPwd,String uccount);//更新支付密码
   
   Msg updPwdByPhone(String newPwd,String phone);
   
   Boolean updPhoneAndPwd(String pwd,String phone,String uccount);
   
   MeiyouUser selUserByPhone(String phone);//通过手机号查用户
   
   MeiyouUser selectUser(int id);

}
